<template>
	<view>
		<view class="exerc-card sheet">
			<!-- 答题卡 -->
			<view class="card-title su-border2">
				<view class="title-left">
					<text class="exerc-type">答题卡</text>
				</view>
				<view class="title-right">
					<text class="ansed-text">已作答</text>
					<text class="ansno-text">未作答</text>
				</view>
			</view>
			<!-- 题目内容 -->
			<view class="card-content">
				<view class="item-content">
					<view class="answer-item" @click="itemClick(index)"
						:class="[item.select ? 'select':'']"
						v-for="(item, index) in exercList" :key="index">
						<text>{{ index + 1 }}</text>
					</view>
				</view>
			</view>
		</view>
	</view>
	
</template>

<script>
	/**
	 * 习题答题卡
	 */
	export default {
		props: {
			exercList: {
				type: Array,
				default() {
					return []
				}
			}
		},
		data() {
			return { }
		},
		methods: {
			itemClick(index) {
				this.$emit('select', index)
			}
		}
	}
</script>

<style lang="scss" scoped>
	@import "./exerc-card.scss";
</style>